package Operator;

import java.util.Arrays;
import java.util.Random;

import environment.IO;

public class AggressiveStrategy extends Strategy {
	
	public PriceList higherPrices(PriceList currentPriceList, double [] bestPrices)
	{
		// init Random for this strategy change
		r = new Random(System.currentTimeMillis());
		
		customPriceList resultPrices = new customPriceList(currentPriceList.operatorName);
		
		double [] myPrices = currentPriceList.getPrices();
		resultPrices.setPrices(myPrices[0], myPrices[1], myPrices[2], myPrices[3], myPrices[4]);
		

     	resultPrices = ripOffSmartStrategy(resultPrices, bestPrices);

		IO.operatorPrint(Arrays.toString(resultPrices.getPrices()), IO.INFO);
		
		return resultPrices;
	}
	
	public PriceList lowerPrices(PriceList currentPriceList, double [] bestPrices)
	{
		// init Random for this strategy change
		r = new Random(System.currentTimeMillis());
		
		customPriceList resultPrices = new customPriceList(currentPriceList.operatorName);
		
		double [] myPrices = currentPriceList.getPrices();
		resultPrices.setPrices(myPrices[0], myPrices[1], myPrices[2], myPrices[3], myPrices[4]);
		
    	resultPrices = beatBestStrategy(resultPrices, bestPrices);
		
		IO.operatorPrint(Arrays.toString(resultPrices.getPrices()), IO.INFO);
		
		return resultPrices;
	}
}
